import { cva, type VariantProps } from 'class-variance-authority';

import styles from './AdvancedButton.module.css';

export type AdvancedButtonVariants = VariantProps<typeof advancedButtonVariantsProps>;

export const advancedButtonVariantsProps = cva(styles.button, {
  variants: {
    accent: {
      left: styles.leftAccent,
      top: styles.topAccent,
      underline: styles.underline
    },
    variant: {
      base: styles.base,
      primary: styles.primary,
      secondary: styles.secondary,
      darkPrimary: styles.darkPrimary,
      accent: styles.accent
    },
    size: {
      small: styles.small,
      medium: styles.medium,
      large: styles.large
    },
    active: {
      selected: styles.selected
    }
  },
  defaultVariants: {
    accent: null,
    size: 'medium',
    variant: 'primary'
  }
});
